package cn.jgrzj.kaola.api.service.impl;

import cn.jgrzj.kaola.api.entity.KaolaCps;
import cn.jgrzj.kaola.api.service.KaolaService;
import cn.quevo.core.beetlsql.BeetlSQLFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

@Service("kaolaService")
@Transactional(transactionManager="transactionManager",rollbackFor={Exception.class})
public class KaolaServiceImpl implements KaolaService {

    @Autowired
    @Qualifier("beetlSqlFactory")
    private BeetlSQLFactory beetlSqlFactory;
    @Override
    public Integer click(KaolaCps kaolaCps) {
        return this.beetlSqlFactory.insertObject("kaola.kaolaCps.create",kaolaCps);
    }
}
